<template>
    <div class="classHeader">
        <div class="H_one" @click="back()">
            <image class="h_back" src="../../../web/img/header-01.png"></image>
        </div>
        <div class="H_two">
            附近门店
        </div>
        <div class="H_three" @click="go()">
            <image class="h_localImg" src="../../../web/img/local.png"></image>
            <text class="h_city">西安</text>
            <text class="h_changeCity">切换</text>
        </div>
    </div>
</template>

<script>
    export default {
        name: "class-header",
        methods:{
            back(){
                // this.$route.back(-1);
                this.$router.push("/");
            },
            go(){
                this.$router.push("/chooseAddress");
                const info = {
                    statusId:2
                };
                localStorage.setItem("whereFrom",JSON.stringify(info));
            }
        }
    }
</script>

<style scoped>
.classHeader{
    flex-direction: row;
    justify-content: center;
    box-shadow: 0 2px 5px #bbb;
    border-bottom: 1px solid #ddd;
}
    .H_one{
        flex:1;
    }
    .h_back{
        width:40px;
        height:90px;
    }
    .H_two{
        flex:1;
        text-align: center;
        font-size: 32px;
        font-weight: 600;
        line-height: 90px;
    }
    .H_three{
        /*flex:1;*/
        flex-direction: row;
        margin-left:50px;
        align-items: center;
        justify-content: center;
    }
    .h_localImg{
        width:22px;
        height:28px;
        /*margin-right:20px;*/
    }
    .h_city{
        flex:1;
        margin-left:12px;
        font-weight: 300;
    }
    .h_changeCity{
        flex:1;
        margin-left:26px;
        margin-right:24px;
        font-weight: 300;
        color:#33c179;
    }
</style>